﻿<%@ WebHandler Language="C#" Class="PermissionHandler" %>

using System;
using System.Web;
using Ext.Net;
using System.Collections.Generic;
using System.Collections;
using System.Web.Security;


public class PermissionHandler : IHttpHandler
{

    public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "text/json";
        string query = "";
        query = context.Request.QueryString["query"];
        List<UserProfile> users = new List<UserProfile>();
        users = MembershipExtender.GetUserInRole(query);
        context.Response.Write(string.Format("{{totalCount:{1},'users':{0}}}", JSON.Serialize(users), users.Count));
    }

    public bool IsReusable
    {
        get
        {
            return true;
        }
    }


}